using System;

namespace Metar.NET
{
    public class ClassTempMinMax:WeatherInformation
    {
        public Temperature min6h=null;
        public Temperature max6h=null;
        public Temperature min24h=null;
        public Temperature max24h=null;
        public ClassTempMinMax()
        {
            this.min6h=new Temperature();
            this.max6h=new Temperature();
            this.min24h=new Temperature();
            this.max24h=new Temperature();
        }
    }
	/// <summary>
	/// Summary description for ClassTemp.
	/// </summary>
	public class Temp:WeatherInformation
	{
        private const string temp_windchilled_image="tempchilled.png";
        private const string temp_high_image="temphigh.png";
        private const string temp_low_image="templow.png";
        private const string temp_nodata_image="temp_nodata.png";


        public Temperature dew=null;
        public Temperature current=null;
        public ClassTempMinMax temp_min_max=null;
        public Temperature windchill=null;
        public Temperature heatindex=null;

		public Temp()
		{
            this.temp_min_max=new ClassTempMinMax();
            this.windchill=new Temperature();
            this.heatindex=new Temperature();
            this.dew=new Temperature();
            this.current=new Temperature();
		}


        /// <summary>
        /// return icon name without path
        /// </summary>
        /// <returns></returns>
        public string get_temp_image() 
        {
            if (this.b_no_data)
                return Temp.temp_nodata_image;

            if (this.windchill.is_set())
            {
                return Temp.temp_windchilled_image;
            }
            else if (this.current.Celcius > 0)
            {
                return Temp.temp_high_image;
            }
            else
            {
                return Temp.temp_low_image;
            }
        }
       
	}
}
